package com.mengbuyun.uniplugin;

import java.util.Date;

public class Cache {
    //  每次都会充值
    public static Date START_TIME = null;
    public static Date END_TIME = null;

    public static String TIME_PATTERN_DEFAULT = "yyyy-MM-dd-hh-mm-ss";

    /**
     * <p>设置启动时间为current time<p/>
     * <p>设置结束时间为null<p/>
     */
    public static  void ON_START(){
        START_TIME = new Date();
        END_TIME = null;
    }

    /**
     * 设置结束时间为current time
     */
    public static  void ON_END(){
        END_TIME = null;
    }


    /**
     * 设置启动时间、结束时间为null
     */
    public static void ON_DESTROY(){
        START_TIME = null;
        END_TIME = null;
    }

    public static void INIT_START_TIME(){
        START_TIME = new Date();
    }
    public static void INIT_END_TIME(){
        END_TIME = new Date();
    }
}
